Optimal. Leaf size=40 \[ \frac {2 a (a+b x)^{2+m}}{b (2+m)}-\frac {(a+b x)^{3+m}}{b (3+m)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {641, 45}
\begin {gather*} \frac {2 a (a+b x)^{m+2}}{b (m+2)}-\frac {(a+b x)^{m+3}}{b (m+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 641
Rubi steps
\begin {align*} \int (a+b x)^m \left (a^2-b^2 x^2\right ) \, dx &=\int (a-b x) (a+b x)^{1+m} \, dx\\ &=\int \left (2 a (a+b x)^{1+m}-(a+b x)^{2+m}\right ) \, dx\\ &=\frac {2 a (a+b x)^{2+m}}{b (2+m)}-\frac {(a+b x)^{3+m}}{b (3+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 36, normalized size = 0.90 \begin {gather*} \frac {(a+b x)^{2+m} (a (4+m)-b (2+m) x)}{b (2+m) (3+m)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.54, size = 40, normalized size = 1.00
method | result | size |
gosper | \(\frac {\left (b x +a \right )^{2+m} \left (-b m x +a m -2 b x +4 a \right )}{b \left (m^{2}+5 m +6\right )}\) | \(40\) |
risch | \(\frac {\left (-b^{3} m \,x^{3}-a \,b^{2} m \,x^{2}-2 b^{3} x^{3}+a^{2} b m x +a^{3} m +6 a^{2} b x +4 a^{3}\right ) \left (b x +a \right )^{m}}{b \left (3+m \right ) \left (2+m \right )}\) | \(74\) |
norman | \(\frac {a^{2} \left (6+m \right ) x \,{\mathrm e}^{m \ln \left (b x +a \right )}}{m^{2}+5 m +6}+\frac {a^{3} \left (4+m \right ) {\mathrm e}^{m \ln \left (b x +a \right )}}{b \left (m^{2}+5 m +6\right )}-\frac {b^{2} x^{3} {\mathrm e}^{m \ln \left (b x +a \right )}}{3+m}-\frac {a m b \,x^{2} {\mathrm e}^{m \ln \left (b x +a \right )}}{m^{2}+5 m +6}\) | \(107\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 91 vs.
\(2 (40) = 80\).
time = 0.29, size = 91, normalized size = 2.28 \begin {gather*} \frac {{\left (b x + a\right )}^{m + 1} a^{2}}{b {\left (m + 1\right )}} - \frac {{\left ({\left (m^{2} + 3 \, m + 2\right )} b^{3} x^{3} + {\left (m^{2} + m\right )} a b^{2} x^{2} - 2 \, a^{2} b m x + 2 \, a^{3}\right )} {\left (b x + a\right )}^{m}}{{\left (m^{3} + 6 \, m^{2} + 11 \, m + 6\right )} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.38, size = 76, normalized size = 1.90 \begin {gather*} -\frac {{\left (a b^{2} m x^{2} - a^{3} m + {\left (b^{3} m + 2 \, b^{3}\right )} x^{3} - 4 \, a^{3} - {\left (a^{2} b m + 6 \, a^{2} b\right )} x\right )} {\left (b x + a\right )}^{m}}{b m^{2} + 5 \, b m + 6 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 267 vs.
\(2 (29) = 58\).
time = 0.31, size = 267, normalized size = 6.68 \begin {gather*} \begin {cases} a^{2} a^{m} x & \text {for}\: b = 0 \\- \frac {a \log {\left (\frac {a}{b} + x \right )}}{a b + b^{2} x} - \frac {2 a}{a b + b^{2} x} - \frac {b x \log {\left (\frac {a}{b} + x \right )}}{a b + b^{2} x} & \text {for}\: m = -3 \\\frac {2 a \log {\left (\frac {a}{b} + x \right )}}{b} - x & \text {for}\: m = -2 \\\frac {a^{3} m \left (a + b x\right )^{m}}{b m^{2} + 5 b m + 6 b} + \frac {4 a^{3} \left (a + b x\right )^{m}}{b m^{2} + 5 b m + 6 b} + \frac {a^{2} b m x \left (a + b x\right )^{m}}{b m^{2} + 5 b m + 6 b} + \frac {6 a^{2} b x \left (a + b x\right )^{m}}{b m^{2} + 5 b m + 6 b} - \frac {a b^{2} m x^{2} \left (a + b x\right )^{m}}{b m^{2} + 5 b m + 6 b} - \frac {b^{3} m x^{3} \left (a + b x\right )^{m}}{b m^{2} + 5 b m + 6 b} - \frac {2 b^{3} x^{3} \left (a + b x\right )^{m}}{b m^{2} + 5 b m + 6 b} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 118 vs.
\(2 (40) = 80\).
time = 1.96, size = 118, normalized size = 2.95 \begin {gather*} -\frac {{\left (b x + a\right )}^{m} b^{3} m x^{3} + {\left (b x + a\right )}^{m} a b^{2} m x^{2} + 2 \, {\left (b x + a\right )}^{m} b^{3} x^{3} - {\left (b x + a\right )}^{m} a^{2} b m x - {\left (b x + a\right )}^{m} a^{3} m - 6 \, {\left (b x + a\right )}^{m} a^{2} b x - 4 \, {\left (b x + a\right )}^{m} a^{3}}{b m^{2} + 5 \, b m + 6 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.46, size = 86, normalized size = 2.15 \begin {gather*} {\left (a+b\,x\right )}^m\,\left (\frac {a^3\,\left (m+4\right )}{b\,\left (m^2+5\,m+6\right )}-\frac {b^2\,x^3\,\left (m+2\right )}{m^2+5\,m+6}+\frac {a^2\,x\,\left (m+6\right )}{m^2+5\,m+6}-\frac {a\,b\,m\,x^2}{m^2+5\,m+6}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________